package com.landscope.issue.mapper;

import com.landscope.issue.controller.wx.dto.AppletMainMessageDto;
import com.landscope.issue.controller.wx.dto.AppletMessageListDto;
import com.landscope.issue.entity.Message;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MessageMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Message record);

    int insertSelective(Message record);

    Message selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Message record);

    int updateByPrimaryKey(Message record);

    List<AppletMainMessageDto.AppletMainMessageItemDto> findTopMessage(@Param("code") String code);

    List<AppletMessageListDto.MessageItem> findAppletMessageListByType(@Param("type") Integer type,
                                                                       @Param("code") String code);

    void readByProjectCode(@Param("projectCode") String projectCode);

    Integer findUnReadNum(@Param("code") String code);
}